<template>
	<view class="pay">
		<view class="pri">
			<text class="price">￥</text>
			<text class="prices">{{money}}.00</text>

		</view>
		<view class="type">
			全部付款方式
		</view>
		<view class="line"></view>
		<view class="modeType">
			<view class="mode">
				<image src="../../static/img/微信支付.jpg" mode=""></image>
				<text>微信支付</text>
			</view>
			<radio-group @change="radioChange" class="select">
				<label class="uni-list-cell uni-list-cell-pd" v-for="(item, index) in items" :key="item.value">
					<view>
						<radio class="radio" :value="item.value" :checked="index === current" />
					</view>
					<view>{{item.name}}</view>
				</label>
			</radio-group>
		</view>
		
		<view class="modeType">
			<view class="mode">
				<image src="../../static/img/支付宝支付.jpg" mode=""></image>
				<text>支付宝支付</text>
			</view>
		</view>
		<button class="payment" type="default">微信支付￥{{money}}.00</button>
	</view>
</template>

<script>
	export default {
	    data() { 
	        return {
	            items: [{
	                    value: '微信支付',
	                    name: ''
	                },
	                {
	                    value: '支付宝支付',
	                    name: ''
	                },
	            ],
	            current: 0,
				money:''
	        }
	    },
		onLoad(e) {
			this.money = e.money
		},
	    methods: {
	        radioChange: function(evt) {
	            for (let i = 0; i < this.items.length; i++) {
	                if (this.items[i].value === evt.detail.value) {
	                    this.current = i;
	                    break;
	                }
	            }
	        }
	    }
	}
</script>

<style lang="less">
	@import './../../static/style/pay.less';
</style>
